package com.rdd.wordcount

import org.apache.spark.{SparkConf, SparkContext}

object Demo01 {
  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName("Demo01").setMaster("local")

    val sc = new SparkContext(conf)
    /**
     * 并行集合
     */
    val data = Array(1, 2, 3, 4, 5)
    val disData = sc.parallelize(data)

    /**
     * 外部数据集
     */
    val distFile = sc.textFile("data.txt")
  }
}
